home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / PRGMMING / EDITMEMO.ZIP / EDITMEMO.DOC < prev    next >
Encoding:
Text File  |  1994-11-09  |  5.4 KB  |  172 lines

  1. EditMemo for Clarion 3
  2. ======================
  3. Version 1.0
  4. Copyright 1994 Mander Li
  5. All rights reserved
  6.  
  7.  
  8.  
  9. Description
  10. -----------
  11. This is a little screen editor for editing a memo field.
  12.  
  13.  
  14.  
  15. Packing list
  16. ------------
  17. The .ZIP file should contain the following files:
  18.  1. DDVEDTME.DLL
  19.  2. DDVEDTME.LIB
  20.  3. DESEDTME.DLL
  21.  4. DESEDTME.LIB
  22.  5. DEVEDTME.LIB
  23.  6. DOVEDTME.LIB
  24.  7. EDITMEMO.DOC   - this file
  25.  8. EDITMEMO.INC
  26.  9. EDM.DAT        - test data
  27. 10. EDM.K01
  28. 11. EDM.MEM
  29. 12. TESTEDM.APP    - test application
  30. 13. TESTEDM.DCT
  31. 14. TESTEDM.PR
  32.  
  33.  
  34.  
  35. Installation and Test Run
  36. -------------------------
  37. 1. Create a directory called C:\CLARION3\EDITMEMO for running the demo
  38. 2. Change directory to it and unzip all the files into this directory
  39. 3. Move MEMOEDIT.INC C:\CLARION3
  40. 4. Move *.DLL to C:\CLARION3
  41. 5. Move *.LIB to C:\CLARION3\LIB
  42. 6. Run CDD, make and run TESTEDM.APP
  43. 7. While you are in the memo field, press F1 to get a list of all the
  44.    editor commands
  45.  
  46.  
  47.  
  48. How to set up EditMemo from in AppGen
  49. -------------------------------------
  50. 1. In the Form, put the following lines in the 'Data Section' embed:
  51.         MemoGroup    GROUP,OVER(MemoField)
  52.         MemoArray      STRING(MemoColumnWidth),DIM(MemoRows)
  53.                      END
  54.  
  55.    where MemoField is the name of the memo, eg fil:memo
  56.          MemoColumnWidth is the number of characters per row;  maximum 80;
  57.          MemoRows is the number of rows in the memo
  58.  
  59.    For example, the embed may actually like this:
  60.         MemoGroup    GROUP,OVER(fil:memo)
  61.         MemoArray      STRING(76, 50)
  62.                      END
  63.  
  64.  
  65.    Note that (1) MemoColumnWidth times MemoRows must be equal to the
  66.                  maximum length of the memo.
  67.              (2) MemoGroup and MemoArray are just arbitray names.  You
  68.                  can use any other names.
  69.  
  70. 2. Put the memo field as an entry field in the Form as normal.  And put
  71.    the following lines into the 'When Text Field is Selected' embed:
  72.  
  73.         IF ~NonStopSelect
  74.           ALERT
  75.           ALERT(AltO)
  76.           ALERT(AltC)
  77.       !
  78.       !   Alert all other keys here.
  79.       !   The hot keys of each entry field and button have to be alerted
  80.       !
  81.           EditMemo(MemoGroup, MemoArray, ?MemoField)
  82.         END
  83.  
  84.    where MemoGroup and MemoArray are as defined in step 1;
  85.          MemoField is the field name of the memo
  86.  
  87.    For example, if the form has three buttons: ?Ok, ?Cancel, and ?Items;
  88.    and two other entry fields (excluding the memo field) with hot keys S
  89.    and N, then the embed may actually like this:
  90.  
  91.         IF ~NonStopSelect
  92.           ALERT
  93.           ALERT(AltO)
  94.           ALERT(AltC)
  95.           ALERT(AltI)
  96.           ALERT(AltS)
  97.           ALERT(AltN)
  98.           EditMemo(MemoGroup, MemoArray, ?fil:memo)
  99.         END
  100.  
  101.  
  102. 3. While you are in the Form, click on the Procedures button, and insert
  103.    'EditMemo' in the Procedure Calls table
  104.  
  105. 4. If you are not at the Procedure Worksheet, shift to the Module view
  106.    by pressing Ctrl-L.  Press the Insert key to add in a new module:
  107.  
  108.        Module Name: %clapfx%EDTME.LIB
  109.               Type: External Object Module
  110.       Include file: C:\CLARION3\EDITMEMO.INC
  111.  
  112. 5. Go back to the Procedure view by pressing Ctrl-P.  Now define the
  113.    ToDo procedure EditMemo as:
  114.  
  115.        Template: External
  116.     Module Name: %clapfx%EDTME.LIB
  117.  
  118.  
  119.  
  120. Modifications
  121. -------------
  122. If you look at the include file EDITMEMO.INC, you'll find that there are
  123. two optional parameters to the EditMemo procedure.
  124.  
  125. 4th parameter - a byte constant or variable.  If set to zero, the status
  126.                 line (the 25th row of the screen) will be suppressed.
  127.  
  128. 5th parameter - a group field containing the following fields (in the
  129.                 following order) that change the color and the
  130.                 keystrokes to activate a command.
  131.  
  132. NormalColor  byte(48)          !Black on cyan - color for normal text
  133. MarkedColor  byte(14)          !Yellow on black - color when the text is marked
  134. ExitKey      short(CtrlEnter)  !Exit from editor
  135. BOL          short(HomeKey)    !move cursor to beginning of line
  136. EOL          short(EndKey)     !move cursor to end of line
  137. FirstPage    short(CtrlPgUp)   !go to first page
  138. LastPage     short(CtrlPgDn)   !go to last page
  139. DelWord      short(CtrlT)      !delete word
  140. DelEOL       short(CtrlEnd)    !delete up to end of line
  141. DelLine      short(CtrlY)      !delete a line
  142. Reformat     short(CtrlB)      !reformat starting from cursor
  143. MarkBlk      short(CtrlK)      !start/end marking text
  144. DelBlk       short(CtrlD)      !delete marked text
  145. CopyBlk      short(CtrlC)      !copy marked text
  146. MoveBlk      short(CtrlM)      !move marked text
  147. Unmark       short(CtrlU)      !unmark marked text
  148. PrevWord     short(CtrlLeft)   !move cursor to previous word
  149. NextWord     short(CtrlRight)  !move cursor to next word
  150.  
  151.  
  152.  
  153. Support
  154. -------
  155. These DLLs are free.  There is no support.  But if you have any
  156. problems, I can be contacted via CompuServe (100354,1620) and Sable
  157. Software BBS (FidoNet 3:640/311), or you may send me a postcard.
  158.  
  159.  
  160.  
  161. Source programs
  162. ---------------
  163. The source programs (all in Clarion 3.009) are available for $40
  164. Australian dollars (including the licence fee to use the source programs
  165. in your applications).  Please send a money order (obtained from the
  166. post office) to:    Mander Li
  167.                     29 Estoril Street,
  168.                     Robertson,
  169.                     Queensland   4109
  170.                     Australia
  171.  
  172.